package inventory.service.impl;

import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
import inventory.entity.Equipment;
import inventory.entity.po.EquipmentPo;
import inventory.mappers.EquipmentMapper;
import inventory.mappers.EquipmentPoMapper;
import inventory.service.EquipmentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author sxt
 * @since 2019-11-06
 */
@Service
public class EquipmentServiceImpl extends ServiceImpl<EquipmentMapper, Equipment> implements EquipmentService {

    @Autowired
    private EquipmentPoMapper equipmentPoMapper;

    @Override
    public List<EquipmentPo> queryAllEquipments() {
        List<EquipmentPo> equipmentPos = equipmentPoMapper.selectList(new EntityWrapper<>());
        return equipmentPos;
    }

    @Override
    public List<EquipmentPo> queryEquipmentPoByCondition(Map<String, Object> columnMap) {
        List<EquipmentPo> equipmentPos = equipmentPoMapper.selectByMap(columnMap);
        return equipmentPos;
    }
}
